<template>
  <div class="_ehl_drag_node">
    <div @click="onclick"> {{ param.name }}</div>
  </div>
</template>
<script>
  import node from './ehlDragNodeBase.js'
  export default {
    /*可用属性
    param:节点所有的属性参数
    nodes:节点集合
    edges:线集合
    vue:外层vue实例
    graph:当前图的实例
    node:当前点
    */
    name: 'drag-node',
    extends: node,
    methods: {
      onclick() {
        let { param, nodes, edges, vue, graph, node } = this.getGraphParam()
        if (this.param.event === 'move') {
          this.param.event = null
          return
        }
        this.param.event = null
        this.param.name++
      },
    },
  }
</script>
<style lang="less" scoped>
  ._ehl_drag_node {
    position: relative;
    width: 100px;
    height: 100px;
    border: 1px solid #007aff;
  }
</style>
